package com.example.bootcurriculumproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bootcurriculumproject.entity.Ship;
import org.apache.ibatis.annotations.*;


import java.util.List;

@Mapper
public interface ShipMapper extends BaseMapper<Ship> {
@Select("select * from shippingarea")
    List<Ship> selectAll();
@Insert("insert into shippingarea(consignee,region,address,postalcode,phone) values (#{consignee},#{region},#{address},#{postalcode},#{phone})")
    void addShip(Ship ship);
@Delete("delete from shippingarea where addressnum=#{addressnum}")
    void deleteaddressnum(Long addressnum);
@Update("update shippingarea set consignee=#{consignee},region=#{region},address=#{address},address=#{address},postalcode=#{postalcode} where addressnum=#{addressnum}")
    void updateAddresssShip(Ship ship);
@Select("select * from shippingarea where addressnum=#{addressnum}")
    Ship selectByAddressnum(Long addressnum);
}
